function CalendarNote(note) {
    this._id = note.id;
    this._date = Date.parseExact(note.date, CalendarConstants.JSONDateFormat);
    this._content = note.content;
    this._creator = note.creator;
}

CalendarNote.prototype = {
    onMonth: function(year, month) {
        return this._date.getFullYear() == year && this._date.getMonth() + 1 == month;
    },

    on: function(date) {
        return this._date.equals(date);
    },
    
    setContent: function(content){
        this._content = content;
    },

    getContent: function(){
        return this._content;
    },

    getId: function(){
        return this._id;
    },

    getCreator: function(){
        return this._creator;
    },

    getDate:function(){
        return this._date;
    },

    toNote: function(){
        return new pwc.Note({id: this._id,  content: this._content, category: "calendar", creator:this._creator, properties:{date: this._date.toString(CalendarConstants.JSONDateFormat)}});
    }
    
};